package com.msmall.community.team.dao;

import java.util.List;

import com.msmall.base.dao.BaseDao;
import com.msmall.community.team.model.Team;

public interface TeamDao extends BaseDao<Team, Long>{

	/**
	 * 通过组名查找组；精确查找
	 */
	public Team loadTeamByName(String name) throws Exception;
	
	/**
	 * 通过用户ID和职位，查找到此用户所在组
	 * eg : postion = TeamUser.Position_chairman用户所有创建的组
	 * @param userid
	 */
	public List<Team> loadTeamsByUserPosition(Long userid, Integer position) throws Exception;
	
	/**
	 * 通过用户ID，查找到此用户所在组
	 * @param userid
	 */
	public List<Team> loadTeamsByUserStatus(Long userid, Integer status) throws Exception;
}
